!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=248)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var s=typeof r;if("string"===s||"number"===s)e.push(r);else if(Array.isArray(r)){if(r.length){var i=o.apply(null,r);i&&e.push(i)}}else if("object"===s)if(r.toString===Object.prototype.toString)for(var c in r)n.call(r,c)&&r[c]&&e.push(c);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.lodash},function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wc.blocksCheckout},function(e,t,n){var r=n(40);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.deprecated},function(e,t,n){"use strict";var r=n(13),o=n.n(r),s=n(0),i=n(1),c=n(30),a=({imageUrl:e=`${c.n}/block-error.svg`,header:t=Object(i.__)("Oops!","woocommerce"),text:n=Object(i.__)("There was an error loading the content.","woocommerce"),errorMessage:r,errorMessagePrefix:o=Object(i.__)("Error:","woocommerce"),button:a,showErrorBlock:l=!0})=>l?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},e&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},t&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},t),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),r&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},o?o+" ":"",r),a&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},a))):null;n(42);class l extends s.Component{constructor(...e){super(...e),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,showErrorBlock:r=!0,text:o,errorMessagePrefix:i,renderError:c,button:l}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof c?c({errorMessage:u}):Object(s.createElement)(a,{showErrorBlock:r,errorMessage:n?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:i,button:l}):this.props.children}}t.a=l},,function(e,t,n){"use strict";var r=n(0),o=n(4),s=n.n(o);t.a=({label:e,screenReaderLabel:t,wrapperElement:n,wrapperProps:o={}})=>{let i;const c=null!=e,a=null!=t;return!c&&a?(i=n||"span",o={...o,className:s()(o.className,"screen-reader-text")},Object(r.createElement)(i,{...o},t)):(i=n||r.Fragment,c&&a&&e!==t?Object(r.createElement)(i,{...o},Object(r.createElement)("span",{"aria-hidden":"true"},e),Object(r.createElement)("span",{className:"screen-reader-text"},t)):Object(r.createElement)(i,{...o},e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(38);const o=e=>!Object(r.a)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return o(e)&&t in e}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0);const o=Object(r.createContext)("page"),s=()=>Object(r.useContext)(o);o.Provider},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";(function(e){var r=n(0);n(46);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(75))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(14),s=n.n(o);function i(e){const t=Object(r.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,n){"use strict";n.d(t,"p",(function(){return s})),n.d(t,"n",(function(){return i})),n.d(t,"m",(function(){return c})),n.d(t,"o",(function(){return a})),n.d(t,"k",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"l",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return b})),n.d(t,"f",(function(){return m})),n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return v})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return y})),n.d(t,"e",(function(){return w}));var r,o=n(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=s.pluginUrl+"images/",c=s.pluginUrl+"build/",a=s.buildPhase,l=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),b=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(o.getSetting)("localPickupEnabled",!1),h=Object(o.getSetting)("countries",{}),g=Object(o.getSetting)("countryData",{}),O=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowBilling)).map((e=>[e,h[e]||""]))),v=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowBilling)).map((e=>[e,g[e].states||[]]))),j=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowShipping)).map((e=>[e,h[e]||""]))),y=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowShipping)).map((e=>[e,g[e].states||[]]))),w=Object.fromEntries(Object.keys(g).map((e=>[e,g[e].locale||[]])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n(3),o=n(5),s=n(0),i=n(14),c=n.n(i),a=n(27),l=n(54),u=n(22);const d=e=>{const t=Object(u.a)();e=e||t;const n=Object(o.useSelect)((t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(s.useCallback)((t=>{i(e,t)}),[e,i])]},p=(e,t,n)=>{const i=Object(u.a)();n=n||i;const c=Object(o.useSelect)((o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)),[n,e]),{setQueryValue:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[c,Object(s.useCallback)((t=>{a(n,e,t)}),[n,e,a])]},f=(e,t)=>{const n=Object(u.a)();t=t||n;const[r,o]=d(t),i=Object(a.a)(r),p=Object(a.a)(e),f=Object(l.a)(p),b=Object(s.useRef)(!1);return Object(s.useEffect)((()=>{c()(f,p)||(o(Object.assign({},i,p)),b.current=!0)}),[i,p,f,o]),b.current?[r,o]:[e,o]}},,,,,function(e,t,n){"use strict";var r=n(4),o=n.n(r),s=n(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...n},r){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...n,ref:r})}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>null===e},,function(e,t,n){var r=n(28).default,o=n(41);e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(28).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(9);function o(e,t,n){var o=this,s=Object(r.useRef)(null),i=Object(r.useRef)(0),c=Object(r.useRef)(null),a=Object(r.useRef)([]),l=Object(r.useRef)(),u=Object(r.useRef)(),d=Object(r.useRef)(e),p=Object(r.useRef)(!0);Object(r.useEffect)((function(){d.current=e}),[e]);var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var b=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,h="maxWait"in n,g=h?Math.max(+n.maxWait||0,t):null;Object(r.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]);var O=Object(r.useMemo)((function(){var e=function(e){var t=a.current,n=l.current;return a.current=l.current=null,i.current=e,u.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(c.current),c.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-s.current;return!s.current||n>=t||n<0||h&&e-i.current>=g},O=function(t){return c.current=null,m&&a.current?e(t):(a.current=l.current=null,u.current)},v=function e(){var o=Date.now();if(r(o))return O(o);if(p.current){var c=t-(o-s.current),a=h?Math.min(c,g-(o-i.current)):c;n(e,a)}},j=function(){var d=Date.now(),f=r(d);if(a.current=[].slice.call(arguments),l.current=o,s.current=d,f){if(!c.current&&p.current)return i.current=s.current,n(v,t),b?e(s.current):u.current;if(h)return n(v,t),e(s.current)}return c.current||n(v,t),u.current};return j.cancel=function(){c.current&&(f?cancelAnimationFrame(c.current):clearTimeout(c.current)),i.current=0,a.current=s.current=l.current=c.current=null},j.isPending=function(){return!!c.current},j.flush=function(){return c.current?O(Date.now()):u.current},j}),[b,h,t,g,m,f]);return O}function s(e,t){return e===t}function i(e){return"function"==typeof e?function(){return e}:e}function c(e,t,n){var c,a,l=n&&n.equalityFn||s,u=(c=Object(r.useState)(i(e)),a=c[1],[c[0],Object(r.useCallback)((function(e){return a(i(e))}),[])]),d=u[0],p=u[1],f=o(Object(r.useCallback)((function(e){return p(e)}),[p]),t,n),b=Object(r.useRef)(e);return l(b.current,e)||(f(e),b.current=e),[d,f]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=function(e){return function(t,n,r){return e(t,n,r)*r}},o=function(e,t){if(e)throw Error("Invalid sort config: "+t)},s=function(e){var t=e||{},n=t.asc,s=t.desc,i=n?1:-1,c=n||s;return o(!c,"Expected `asc` or `desc` property"),o(n&&s,"Ambiguous object with `asc` and `desc` config properties"),{order:i,sortBy:c,comparer:e.comparer&&r(e.comparer)}};function i(e,t,n){if(void 0===e||!0===e)return function(e,r){return t(e,r,n)};if("string"==typeof e)return o(e.includes("."),"String syntax not allowed for nested properties."),function(r,o){return t(r[e],o[e],n)};if("function"==typeof e)return function(r,o){return t(e(r),e(o),n)};if(Array.isArray(e)){var r=function(e){return function t(n,r,o,i,c,a,l){var u,d;if("string"==typeof n)u=a[n],d=l[n];else{if("function"!=typeof n){var p=s(n);return t(p.sortBy,r,o,p.order,p.comparer||e,a,l)}u=n(a),d=n(l)}var f=c(u,d,i);return(0===f||null==u&&null==d)&&r.length>o?t(r[o],r,o+1,i,c,a,l):f}}(t);return function(o,s){return r(e[0],e,1,n,t,o,s)}}var c=s(e);return i(c.sortBy,c.comparer||t,c.order)}var c=function(e,t,n,r){return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(n=n[0]),t.sort(i(n,r,e))):t};function a(e){var t=r(e.comparer);return function(n){var r=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return{asc:function(e){return c(1,r,e,t)},desc:function(e){return c(-1,r,e,t)},by:function(e){return c(1,r,e,t)}}}}var l=function(e,t,n){return null==e?n:null==t?-n:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},u=a({comparer:l});a({comparer:l,inPlaceSorting:!0})},function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=window.wp.dom},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(0);const o=Object(r.createContext)({}),s=()=>{const{wrapper:e}=Object(r.useContext)(o);return t=>{e&&e.current&&(e.current.hidden=!t)}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(17);const s=[".wp-block-woocommerce-cart"],i=({Block:e,containers:t,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))})=>{0!==t.length&&Array.prototype.forEach.call(t,((t,i)=>{const c=n(t,i),a=s(t,i),l={...t.dataset,...c.attributes||{}};(({Block:e,container:t,attributes:n={},props:s={},errorBoundaryProps:i={}})=>{Object(r.render)(Object(r.createElement)(o.a,{...i},Object(r.createElement)(r.Suspense,{fallback:Object(r.createElement)("div",{className:"wc-block-placeholder"})},e&&Object(r.createElement)(e,{...s,attributes:n}))),t,(()=>{t.classList&&t.classList.remove("is-loading")}))})({Block:e,container:t,props:c,attributes:l,errorBoundaryProps:a})}))},c=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:n,getProps:r,getErrorBoundaryProps:o,selector:c}=e;(({Block:e,getProps:t,getErrorBoundaryProps:n,selector:r,wrappers:o})=>{const s=document.body.querySelectorAll(r);o&&o.length>0&&Array.prototype.filter.call(s,(e=>!((e,t)=>Array.prototype.some.call(t,(t=>t.contains(e)&&!t.isSameNode(e))))(e,o))),i({Block:e,containers:s,getProps:t,getErrorBoundaryProps:n})})({Block:n,getProps:r,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,(t=>{t.addEventListener("wc-blocks_render_blocks_frontend",(()=>{(({Block:e,getProps:t,getErrorBoundaryProps:n,selector:r,wrapper:o})=>{const s=o.querySelectorAll(r);i({Block:e,containers:s,getProps:t,getErrorBoundaryProps:n})})({...e,wrapper:t})}))}))}},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"h",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return b}));var r=n(15),o=n(67),s=n(29),i=n(125);function c(){return Math.floor(Math.random()*Date.now())}const a=e=>e.replace("pa_",""),l=(e,t=[])=>{const n={};t.forEach((e=>{const{attribute:t,slug:r,operator:s}=e,i=a(t),c=r.join(","),l=`${o.b}${i}`,u="in"===s?"or":"and";n[`${o.a}${i}`]=c,n[l]=u}));const s=Object(r.removeQueryArgs)(e,...Object.keys(n));return Object(r.addQueryArgs)(s,n)},u=({currentCheckedFilters:e,hasSetFilterDefaultsFromUrl:t})=>t&&0===e.length,d=e=>{if(e){const t=Object(o.d)(`filter_${e.name}`);return("string"==typeof t?t.split(","):[]).map((e=>encodeURIComponent(e).toLowerCase()))}return[]},p=(e,t)=>{const n=Object.entries(t).reduce(((e,[t,n])=>t.includes("query_type")?e:{...e,[t]:n}),{});return Object.entries(n).reduce(((t,[n,r])=>e[n]===r&&t),!0)},f=e=>e.trim().replace(/\s/g,"-").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,""),b=e=>({className:Object(s.a)(null==e?void 0:e.className)?e.className:"",attributeId:parseInt(Object(s.a)(null==e?void 0:e.attributeId)?e.attributeId:"0",10),showCounts:"true"===(null==e?void 0:e.showCounts),queryType:Object(s.a)(null==e?void 0:e.queryType)&&e.queryType||i.attributes.queryType.default,heading:Object(s.a)(null==e?void 0:e.heading)?e.heading:"",headingLevel:Object(s.a)(null==e?void 0:e.headingLevel)&&parseInt(e.headingLevel,10)||i.attributes.headingLevel.default,displayStyle:Object(s.a)(null==e?void 0:e.displayStyle)&&e.displayStyle||i.attributes.displayStyle.default,showFilterButton:"true"===(null==e?void 0:e.showFilterButton),selectType:Object(s.a)(null==e?void 0:e.selectType)&&e.selectType||i.attributes.selectType.default,isPreview:!1})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(5),s=n(0),i=n(27);const c=e=>{const{namespace:t,resourceName:n,resourceValues:c=[],query:a={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const u=Object(s.useRef)({results:[],isLoading:!0}),d=Object(i.a)(a),p=Object(i.a)(c),f=(()=>{const[,e]=Object(s.useState)();return Object(s.useCallback)((t=>{e((()=>{throw t}))}),[])})(),b=Object(o.useSelect)((e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),s=[t,n,d,p],i=o.getCollectionError(...s);if(i){if(!(i instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");f(i)}return{results:o.getCollection(...s),isLoading:!o.hasFinishedResolution("getCollection",s)}}),[t,n,p,d,l]);return null!==b&&(u.current=b),u.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)((()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},function(e,t,n){"use strict";var r=n(0),o=n(1),s=n(19);n(135),t.a=({name:e,count:t})=>Object(r.createElement)(r.Fragment,null,e,null!==t&&Number.isFinite(t)&&Object(r.createElement)(s.a,{label:t.toString(),screenReaderLabel:Object(o.sprintf)(/* translators: %s number of products. */
Object(o._n)("%s product","%s products",t,"woocommerce"),t),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))},,function(e,t,n){"use strict";var r=n(8),o=n(0),s=n(4),i=n.n(s),c=n(7),a=n(16),l=n.n(a),u=n(11),d=n(47),p=n(10),f=Object(o.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(p.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),b=n(1);function m(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const s=o.getBoundingClientRect();return new r.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function g(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=h)}let O=0;function v(){return Object(o.useEffect)((()=>(0===O&&g(!0),++O,()=>{1===O&&g(!1),--O})),[]),null}var j=n(26);function y(e){const t=Object(o.useContext)(j.a),n=t.slots[e]||{},r=t.fills[e],s=Object(o.useMemo)((()=>r||[]),[r]);return{...n,updateSlot:Object(o.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:Object(o.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}var w=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function E({name:e,children:t,registerFill:n,unregisterFill:r}){const s=(e=>{const{getSlot:t,subscribe:n}=Object(o.useContext)(w),[r,s]=Object(o.useState)(t(e));return Object(o.useEffect)((()=>(s(t(e)),n((()=>{s(t(e))})))),[e]),r})(e),i=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)((()=>(n(e,i.current),()=>r(e,i.current))),[]),Object(o.useLayoutEffect)((()=>{i.current.children=t,s&&s.forceUpdate()}),[t]),Object(o.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),s&&s.node?(Object(c.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var k=e=>Object(o.createElement)(w.Consumer,null,(({registerFill:t,unregisterFill:n})=>Object(o.createElement)(E,Object(r.a)({},e,{registerFill:t,unregisterFill:n}))));class S extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:r}=this.props,s=Object(c.map)(r(t,this),(e=>{const t=Object(c.isFunction)(e.children)?e.children(n):e.children;return o.Children.map(t,((e,t)=>{if(!e||Object(c.isString)(e))return e;const n=e.key||t;return Object(o.cloneElement)(e,{key:n})}))})).filter(Object(c.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(c.isFunction)(e)?e(s):s)}}var x=e=>Object(o.createElement)(w.Consumer,null,(({registerSlot:t,unregisterSlot:n,getFills:s})=>Object(o.createElement)(S,Object(r.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:s}))));function _(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function T({name:e,children:t}){const n=y(e),r=Object(o.useRef)({rerender:_()});return Object(o.useEffect)((()=>(n.registerFill(r),()=>{n.unregisterFill(r)})),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(o.createPortal)(t,n.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:n="div",...s},i){const c=Object(o.useContext)(j.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)((()=>(c.registerSlot(e,a,t),()=>{c.unregisterSlot(e,a)})),[c.registerSlot,c.unregisterSlot,e]),Object(o.useLayoutEffect)((()=>{c.updateSlot(e,t)})),Object(o.createElement)(n,Object(r.a)({ref:Object(u.useMergeRefs)([i,a])},s))}));function L(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k,e),Object(o.createElement)(T,e))}n(14),o.Component;const A=Object(o.forwardRef)((({bubblesVirtually:e,...t},n)=>e?Object(o.createElement)(C,Object(r.a)({},t,{ref:n})):Object(o.createElement)(x,t)));function I(e){return"appear"===e?"top":"left"}const R="Popover";function P(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:s}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const c=n?parseInt(n,10):0,a=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+c,width:e.width-l-u,height:e.height-c-a,left:e.left+l,right:e.right-u,top:e.top+c,bottom:e.bottom-a}}function F(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function N(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const B=Object(o.forwardRef)((({headerTitle:e,onClose:t,children:n,className:s,noArrow:c=!0,isAlternate:a,position:p="bottom right",range:h,focusOnMount:g="firstElement",anchorRef:O,shouldAnchorIncludePadding:j,anchorRect:w,getAnchorRect:E,expandOnMobile:k,animate:S=!0,onClickOutside:x,onFocusOutside:_,__unstableStickyBoundaryElement:T,__unstableSlotName:C=R,__unstableObserveElement:A,__unstableBoundaryParent:B,__unstableForcePosition:D,__unstableForceXAlignment:V,...W},H)=>{const q=Object(o.useRef)(null),U=Object(o.useRef)(null),z=Object(o.useRef)(),K=Object(u.useViewportMatch)("medium","<"),[$,G]=Object(o.useState)(),Q=y(C),X=k&&K,[J,Z]=Object(u.useResizeObserver)();c=X||c,Object(o.useLayoutEffect)((()=>{if(X)return N(z.current,"is-without-arrow",c),N(z.current,"is-alternate",a),F(z.current,"data-x-axis"),F(z.current,"data-y-axis"),M(z.current,"top"),M(z.current,"left"),M(U.current,"maxHeight"),void M(U.current,"maxWidth");const e=()=>{if(!z.current||!U.current)return;let e=function(e,t,n,r=!1,o,s){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return m(Object(d.getRectangleFromRange)(r),r.endContainer.ownerDocument,s);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=m(r.getBoundingClientRect(),r.ownerDocument,s);return o?e:P(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),c=m(new window.DOMRect(n.left,n.top,n.width,i.bottom-n.top),e.ownerDocument,s);return o?c:P(c,r)}if(!e.current)return;const{parentNode:i}=e.current,c=i.getBoundingClientRect();return o?c:P(c,i)}(q,w,E,O,j,z.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=z.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}var s;B&&(r=null===(s=z.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const i=Z.height?Z:U.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:f,yAxis:h,contentHeight:g,contentWidth:v}=function(e,t,n="top",r,o,s,i,c,a){const[l,u="center",d]=n.split(" "),p=function(e,t,n,r,o,s,i,c){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-i;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let f,b=n,m=null;if(!o&&!c)if("middle"===n&&u.contentHeight===a)b="middle";else if("top"===n&&d.contentHeight===a)b="top";else if("bottom"===n&&p.contentHeight===a)b="bottom";else{b=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===b?d.contentHeight:p.contentHeight;m=e!==a?e:null}return f="middle"===b?u.popoverTop:"top"===b?d.popoverTop:p.popoverTop,{yAxis:b,popoverTop:f,contentHeight:m}}(e,t,l,d,r,0,s,c),f=function(e,t,n,r,o,s,i,c,a){const{width:l}=t;"left"===n&&Object(b.isRTL)()?n="right":"right"===n&&Object(b.isRTL)()&&(n="left"),"left"===r&&Object(b.isRTL)()?r="right":"right"===r&&Object(b.isRTL)()&&(r="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===r?p=e.right:"middle"===s||a||(p=u);let f=e.right;"left"===r?f=e.left:"middle"===s||a||(f=u);const m={popoverLeft:p,contentWidth:p-l>0?l:p},h={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,O=n,v=null;if(!o&&!c)if("center"===n&&d.contentWidth===l)O="center";else if("left"===n&&m.contentWidth===l)O="left";else if("right"===n&&h.contentWidth===l)O="right";else{O=m.contentWidth>h.contentWidth?"left":"right";const e="left"===O?m.contentWidth:h.contentWidth;l>window.innerWidth&&(v=window.innerWidth),e!==l&&(O="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===O?d.popoverLeft:"left"===O?m.popoverLeft:h.popoverLeft,i){const e=i.getBoundingClientRect();g=Math.min(g,e.right-l),Object(b.isRTL)()||(g=Math.max(g,0))}return{xAxis:O,popoverLeft:g,contentWidth:v}}(e,t,u,d,r,p.yAxis,i,c,a);return{...f,...p}}(e,i,p,T,z.current,o,r,D,V);"number"==typeof l&&"number"==typeof u&&(M(z.current,"top",l+"px"),M(z.current,"left",u+"px")),N(z.current,"is-without-arrow",c||"center"===f&&"middle"===h),N(z.current,"is-alternate",a),F(z.current,"data-x-axis",f),F(z.current,"data-y-axis",h),M(U.current,"maxHeight","number"==typeof g?g+"px":""),M(U.current,"maxWidth","number"==typeof v?v+"px":""),G(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[h]||"middle"))};e();const{ownerDocument:t}=z.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const s=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",s),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(O);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),A&&(l=new n.MutationObserver(e),l.observe(A,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",s),n.cancelAnimationFrame(o),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}}),[X,w,E,O,j,p,Z,T,A,B]);const ee=(e,n)=>{if("focus-outside"===e&&_)_(n);else if("focus-outside"===e&&x){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),x(e)}else t&&t()},[te,ne]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:ee,onClose:ee}),re=Object(u.useMergeRefs)([z,te,H]),oe=Boolean(S&&$)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=I(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:$});let se=Object(o.createElement)("div",Object(r.a)({className:i()("components-popover",s,oe,{"is-expanded":X,"is-without-arrow":c,"is-alternate":a})},W,{ref:re},ne,{tabIndex:"-1"}),X&&Object(o.createElement)(v,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:f,onClick:t})),Object(o.createElement)("div",{ref:U,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,n)));return Q.ref&&(se=Object(o.createElement)(L,{name:C},se)),O||w?se:Object(o.createElement)("span",{ref:q},se)}));B.Slot=Object(o.forwardRef)((function({name:e=R},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var D=B,V=function({shortcut:e,className:t}){if(!e)return null;let n,r;return Object(c.isString)(e)&&(n=e),Object(c.isObject)(e)&&(n=e.display,r=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":r},n)};const W=Object(o.createElement)("div",{className:"event-catcher"}),H=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(W,e),Object(o.cloneElement)(t,{children:n}),","),e),q=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(o.cloneElement)(e,{...t,children:n}),U=(e,t,n)=>{if(1!==o.Children.count(e))return;const r=o.Children.only(e);"function"==typeof r.props[t]&&r.props[t](n)};var z=function({children:e,position:t,text:n,shortcut:r}){const[s,i]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{U(e,"onMouseDown",t),document.addEventListener("mouseup",m),i(!0)},f=t=>{U(e,"onMouseUp",t),document.removeEventListener("mouseup",m),i(!1)},b=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,m=b("mouseUp"),h=(t,n)=>r=>{if(U(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&s)return;d.cancel();const o=Object(c.includes)(["focus","mouseenter"],r.type);o!==a&&(n?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",m)};if(Object(o.useEffect)((()=>g),[]),1!==o.Children.count(e))return e;const O={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:b("mouseDown")},v=o.Children.only(e),{children:j,disabled:y}=v.props,w=y?H:q,E=(({grandchildren:e,isOver:t,position:n,text:r,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(D,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(o.createElement)(V,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:j,isOver:a,position:t,text:n,shortcut:r});return w({child:v,eventHandlers:O,childrenWithPopover:E})},K=function({icon:e,className:t,...n}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(r.a)({className:s},n))},$=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(o.createElement)(K,Object(r.a)({icon:e},n));if(Object(o.isValidElement)(e)&&K===e.type)return Object(o.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===p.SVG)){const r={width:t,height:t,...e.props,...n};return Object(o.createElement)(p.SVG,r)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...n}):e},G=n(36);const Q=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:n,target:s,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:b,icon:m,iconPosition:h="left",iconSize:g,showTooltip:O,tooltipPosition:v,shortcut:j,label:y,children:w,text:E,variant:k,__experimentalIsFocusable:S,describedBy:x,..._}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:s,...i}){let c=s;var a,u,d,p,f;return t&&(null!==(a=c)&&void 0!==a||(c="primary")),r&&(null!==(u=c)&&void 0!==u||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=c)&&void 0!==p||(c="secondary")),o&&(null!==(f=c)&&void 0!==f||(c="link")),{...i,variant:c}}(e),T=i()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":a,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!m&&!!w,"has-icon":!!m}),C=b&&!S,L=void 0===n||C?"button":"a",A="a"===L?{href:n,target:s}:{type:"button",disabled:C,"aria-pressed":u};if(b&&S){A["aria-disabled"]=!0;for(const e of Q)_[e]=e=>{e.stopPropagation(),e.preventDefault()}}const I=!C&&(O&&y||j||!!y&&(!w||Object(c.isArray)(w)&&!w.length)&&!1!==O),R=x?Object(c.uniqueId)():null,P=_["aria-describedby"]||R,F=Object(o.createElement)(L,Object(r.a)({},A,_,{className:T,"aria-label":_["aria-label"]||y,"aria-describedby":P,ref:t}),m&&"left"===h&&Object(o.createElement)($,{icon:m,size:g}),E&&Object(o.createElement)(o.Fragment,null,E),m&&"right"===h&&Object(o.createElement)($,{icon:m,size:g}),w);return I?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:x||y,shortcut:j,position:v},F),x&&Object(o.createElement)(G.a,null,Object(o.createElement)("span",{id:R},x))):Object(o.createElement)(o.Fragment,null,F,x&&Object(o.createElement)(G.a,null,Object(o.createElement)("span",{id:R},x)))}))},,,,function(e,t,n){"use strict";var r=n(0);n(89),t.a=({children:e})=>Object(r.createElement)("div",{className:"wc-block-filter-title-placeholder"},e)},function(e,t,n){"use strict";var r=n(0),o=n(1),s=n(4),i=n.n(s),c=n(19);n(90),t.a=({className:e,
/* translators: Reset button text for filters. */
label:t=Object(o.__)("Reset","woocommerce"),onClick:n,screenReaderLabel:s=Object(o.__)("Reset filter","woocommerce")})=>Object(r.createElement)("button",{className:i()("wc-block-components-filter-reset-button",e),onClick:n},Object(r.createElement)(c.a,{label:t,screenReaderLabel:s}))},function(e,t,n){"use strict";var r=n(0),o=n(1),s=n(4),i=n.n(s),c=n(19);n(91),t.a=({className:e,isLoading:t,disabled:n,
/* translators: Submit button text for filters. */
label:s=Object(o.__)("Apply","woocommerce"),onClick:a,screenReaderLabel:l=Object(o.__)("Apply filter","woocommerce")})=>Object(r.createElement)("button",{type:"submit",className:i()("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:n,onClick:a},Object(r.createElement)(c.a,{label:s,screenReaderLabel:l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"boolean"==typeof e},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return d}));var r=n(15),o=n(2),s=n(64);const i=Object(o.getSettingWithCoercion)("isRenderingPhpTemplate",!1,s.a),c="query_type_",a="filter_";function l(e){return window?Object(r.getQueryArg)(window.location.href,e):null}function u(e){i?((e=e.replace(/(?:query-(?:\d+-)?page=(\d+))|(?:page\/(\d+))/g,"")).endsWith("?")&&(e=e.slice(0,-1)),window.location.href=e):window.history.replaceState({},"",e)}const d=e=>{const t=Object(r.getQueryArgs)(e);return Object(r.addQueryArgs)(e,t)}},,,,,,,,function(e,t){var n,r,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new b(e,t)),1!==l.length||u||c(f)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})}},,,,,function(e,t,n){"use strict";var r=n(8),o=n(0),s=n(4),i=n.n(s);class c extends o.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:s,className:c,...a}=this.props,l=e?e.length+1:0;return Object(o.createElement)("input",Object(r.a)({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},a,{value:e||"",onChange:this.onChange,size:l,className:i()(c,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==s?`components-form-token-suggestions-${n}-${s}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),s=n(83),i=n.n(s),c=n(4),a=n.n(c),l=n(11);class u extends r.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,i()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}render(){return Object(r.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},Object(o.map)(this.props.suggestions,((e,t)=>{const n=this.computeSuggestionMatch(e),o=a()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return Object(r.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:o,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},n?Object(r.createElement)("span",{"aria-label":this.props.displayTransform(e)},n.suggestionBeforeMatch,Object(r.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):this.props.displayTransform(e))})))}}u.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])},t.a=Object(l.withSafeTimeout)(u)},function(e,t,n){"use strict";e.exports=n(115)},,function(e,t,n){"use strict";var r=n(0),o=n(127),s=n(4),i=n.n(s);n(117),t.a=({className:e,style:t,suggestions:n,multiple:s=!0,saveTransform:c=(e=>e.trim().replace(/\s/g,"-")),messages:a={},validateInput:l=(e=>n.includes(e)),label:u="",...d})=>Object(r.createElement)("div",{className:i()("wc-blocks-components-form-token-field-wrapper",e,{"single-selection":!s}),style:t},Object(r.createElement)(o.a,{label:u,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,__experimentalValidateInput:l,saveTransform:c,maxLength:s?void 0:1,suggestions:n,messages:a,...d}))},function(e,t,n){"use strict";var r=n(0),o=n(1),s=n(4),i=n.n(s),c=n(12);n(118),t.a=({className:e,onChange:t,options:n=[],checked:s=[],isLoading:a=!1,isDisabled:l=!1,limit:u=10})=>{const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)((()=>[...Array(5)].map(((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})))),[]),b=Object(r.useMemo)((()=>{const e=n.length-u;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(/* translators: %s is referring the remaining count of options */
Object(o._n)("Show %s more option","Show %s more options",e,"woocommerce"),e)},Object(o.sprintf)(/* translators: %s number of options to reveal. */
Object(o._n)("Show %s more","Show %s more",e,"woocommerce"),e)))}),[n,u,d]),m=Object(r.useMemo)((()=>d&&Object(r.createElement)("li",{key:"show-less",className:"show-less"},Object(r.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woocommerce")},Object(o.__)("Show less","woocommerce")))),[d]),h=Object(r.useMemo)((()=>{const e=n.length>u+5;return Object(r.createElement)(r.Fragment,null,n.map(((n,o)=>Object(r.createElement)(r.Fragment,{key:n.value},Object(r.createElement)("li",{...e&&!d&&o>=u&&{hidden:!0}},Object(r.createElement)(c.CheckboxControl,{id:n.value,className:"wc-block-checkbox-list__checkbox",label:n.label,checked:s.includes(n.value),onChange:()=>{t(n.value)},disabled:l})),e&&o===u-1&&b))),e&&m)}),[n,t,s,d,u,m,b,l]),g=i()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},e);return Object(r.createElement)("ul",{className:g},a?f:h)}},,,function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(45);const o=(e=[],t,n,o="")=>{const s=e.filter((e=>e.attribute===n.taxonomy)),i=s.length?s[0]:null;if(!(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)))return;const c=i.slug.filter((e=>e!==o)),a=e.filter((e=>e.attribute!==n.taxonomy));c.length>0&&(i.slug=c.sort(),a.push(i)),t(Object(r.a)(a).asc("attribute"))},s=(e=[],t,n,o=[],s="in")=>{if(!n||!n.taxonomy)return[];const i=e.filter((e=>e.attribute!==n.taxonomy));return 0===o.length?t(i):(i.push({attribute:n.taxonomy,operator:s,slug:o.map((({slug:e})=>e)).sort()}),t(Object(r.a)(i).asc("attribute"))),i}},,,,,function(e,t,n){"use strict";var r=n(116);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,s=n.onlyScrollIfNeeded,i=n.alignWithTop,c=n.alignWithLeft,a=n.offsetTop||0,l=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var p=r.isWindow(t),f=r.offset(e),b=r.outerHeight(e),m=r.outerWidth(e),h=void 0,g=void 0,O=void 0,v=void 0,j=void 0,y=void 0,w=void 0,E=void 0,k=void 0,S=void 0;p?(w=t,S=r.height(w),k=r.width(w),E={left:r.scrollLeft(w),top:r.scrollTop(w)},j={left:f.left-E.left-l,top:f.top-E.top-a},y={left:f.left+m-(E.left+k)+d,top:f.top+b-(E.top+S)+u},v=E):(h=r.offset(t),g=t.clientHeight,O=t.clientWidth,v={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(h.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-l,top:f.top-(h.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-a},y={left:f.left+m-(h.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+b-(h.top+g+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||y.top>0?!0===i?r.scrollTop(t,v.top+j.top):!1===i?r.scrollTop(t,v.top+y.top):j.top<0?r.scrollTop(t,v.top+j.top):r.scrollTop(t,v.top+y.top):s||((i=void 0===i||!!i)?r.scrollTop(t,v.top+j.top):r.scrollTop(t,v.top+y.top)),o&&(j.left<0||y.left>0?!0===c?r.scrollLeft(t,v.left+j.left):!1===c?r.scrollLeft(t,v.left+y.left):j.left<0?r.scrollLeft(t,v.left+j.left):r.scrollLeft(t,v.left+y.left):s||((c=void 0===c||!!c)?r.scrollLeft(t,v.left+j.left):r.scrollLeft(t,v.left+y.left)))}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return s(e)}function c(e){return s(e,!0)}function a(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,s=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||s.clientLeft||0,top:r-=i.clientTop||s.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=c(r),t}var l=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="currentStyle",p="runtimeStyle",f="left",b=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function h(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,s=n||o.defaultView.getComputedStyle(e,null);return s&&(r=s.getPropertyValue(t)||s[t]),r}:function(e,t){var n=e[d]&&e[d][t];if(l.test(n)&&!u.test(t)){var r=e.style,o=r[f],s=e[p][f];e[p][f]=e[d][f],r[f]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[f]=o,e[p][f]=s}return""===n?"auto":n});var g=["margin","border","padding"],O=-1,v=2,j=1;function y(e,t,n){var r=0,o=void 0,s=void 0,i=void 0;for(s=0;s<t.length;s++)if(o=t[s])for(i=0;i<n.length;i++){var c;c="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,c))||0}return r}function w(e){return null!=e&&e==e.window}var E={};function k(e,t,n){if(w(e))return"width"===t?E.viewportWidth(e):E.viewportHeight(e);if(9===e.nodeType)return"width"===t?E.docWidth(e):E.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,s=(b(e),h(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=s?j:O);var c=void 0!==o||s,a=o||i;if(n===O)return c?a-y(e,["border","padding"],r):i;if(c){var l=n===v?-y(e,["border"],r):y(e,["margin"],r);return a+(n===j?0:l)}return i+y(e,g.slice(n),r)}m(["Width","Height"],(function(e){E["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],E["viewport"+e](n))},E["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,s=r.documentElement[n];return"CSS1Compat"===r.compatMode&&s||o&&o[n]||s}}));var S={position:"absolute",visibility:"hidden",display:"block"};function x(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=k.apply(void 0,n):function(e,r,o){var s={},i=e.style,c=void 0;for(c in r)r.hasOwnProperty(c)&&(s[c]=i[c],i[c]=r[c]);for(c in function(){t=k.apply(void 0,n)}.call(e),r)r.hasOwnProperty(c)&&(i[c]=s[c])}(e,S),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var s in t)t.hasOwnProperty(s)&&_(e,s,t[s])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);E["outer"+t]=function(t,n){return t&&x(t,e,n?0:j)};var n="width"===e?["Left","Right"]:["Top","Bottom"];E[e]=function(t,r){return void 0===r?t&&x(t,e,O):t?(b(t),h(t)&&(r+=y(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=a(e),r={},o=void 0,s=void 0;for(s in t)t.hasOwnProperty(s)&&(o=parseFloat(_(e,s))||0,r[s]=o+t[s]-n[s]);_(e,r)}(e,t)},isWindow:w,each:m,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(w(e)){if(void 0===t)return i(e);window.scrollTo(t,c(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(w(e)){if(void 0===t)return c(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},E)},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));var r=n(2);n(140),n(5);const o=Object(r.getSetting)("attributes",[]).reduce(((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n&&n.id&&e.push(n),e}),[]),s=e=>{if(e)return o.find((t=>t.id===e))},i=e=>{if(e)return o.find((t=>t.taxonomy===e))}},,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/attribute-filter","version":"1.0.0","title":"Filter by Attribute Controls","description":"Enable customers to filter the product grid by selecting one or more attributes, such as color.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"color":{"text":true,"background":false},"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"attributeId":{"type":"number","default":0},"showCounts":{"type":"boolean","default":false},"queryType":{"type":"string","default":"or"},"headingLevel":{"type":"number","default":3},"displayStyle":{"type":"string","default":"list"},"showFilterButton":{"type":"boolean","default":false},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},,function(e,t,n){"use strict";var r=n(0),o=n(7),s=n(4),i=n.n(s),c=n(1),a=n(11),l=n(24),u=n(14),d=n.n(u),p=n(149),f=n(57),b=n(36);function m({value:e,status:t,title:n,displayTransform:s,isBorderless:l=!1,disabled:u=!1,onClickRemove:d=o.noop,onMouseEnter:h,onMouseLeave:g,messages:O,termPosition:v,termsCount:j}){const y=Object(a.useInstanceId)(m),w=i()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":l,"is-disabled":u}),E=s(e),k=Object(c.sprintf)(
/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
Object(c.__)("%1$s (%2$s of %3$s)"),E,v,j);return Object(r.createElement)("span",{className:w,onMouseEnter:h,onMouseLeave:g,title:n},Object(r.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${y}`},Object(r.createElement)(b.a,{as:"span"},k),Object(r.createElement)("span",{"aria-hidden":"true"},E)),Object(r.createElement)(f.a,{className:"components-form-token-field__remove-token",icon:p.a,onClick:!u&&(()=>d({value:e})),label:O.remove,"aria-describedby":`components-form-token-field__token-text-${y}`}))}var h=n(81),g=n(82),O=n(8),v=n(25),j=Object(a.createHigherOrderComponent)((e=>t=>Object(r.createElement)(e,Object(O.a)({},t,{speak:v.speak,debouncedSpeak:Object(a.useDebounce)(v.speak,500)}))),"withSpokenMessages");const y={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class w extends r.Component{constructor(){super(...arguments),this.state=y,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,r=!d()(t,e.suggestions);(r||n!==e.value)&&this.updateSuggestions(r)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(y)}onKeyDown(e){let t=!1;switch(e.keyCode){case l.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case l.ENTER:t=this.addCurrentToken();break;case l.LEFT:t=this.handleLeftArrowKey();break;case l.UP:t=this.handleUpArrowKey();break;case l.RIGHT:t=this.handleRightArrowKey();break;case l.DOWN:t=this.handleDownArrowKey();break;case l.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case l.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case l.ESCAPE:t=this.handleEscapeKey(e),e.stopPropagation()}t&&e.preventDefault()}onKeyPress(e){let t=!1;44===e.charCode&&(t=this.handleCommaKey()),t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,r=t.split(n),s=Object(o.last)(r)||"";r.length>1&&this.addNewTokens(r.slice(0,-1)),this.setState({incompleteTokenValue:s},this.updateSuggestions),this.props.onInputChange(s)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e<this.props.value.length&&(this.deleteToken(this.props.value[e]),this.moveInputToIndex(e))}addCurrentToken(){let e=!1;const t=this.getSelectedSuggestion();return t?(this.addNewToken(t),e=!0):this.inputHasValidValue()&&(this.addNewToken(this.state.incompleteTokenValue),e=!0),e}addNewTokens(e){const t=Object(o.uniq)(e.map(this.props.saveTransform).filter(Boolean).filter((e=>!this.valueContainsToken(e))));if(t.length>0){const e=Object(o.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(e=this.state.incompleteTokenValue,t=this.props.suggestions,n=this.props.value,r=this.props.maxSuggestions,s=this.props.saveTransform){let i=s(e);const c=[],a=[];return 0===i.length?t=Object(o.difference)(t,n):(i=i.toLocaleLowerCase(),Object(o.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===n.indexOf(e)&&(0===t?c.push(e):t>0&&a.push(e))})),t=c.concat(a)),Object(o.take)(t,r)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return Object(o.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(e=!0){const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,r=n.trim().length>1,o=this.getMatchingSuggestions(n),s=o.length>0,i={isExpanded:t||r&&s};if(e&&(i.selectedSuggestionIndex=-1,i.selectedSuggestionScroll=!1),this.setState(i),r){const{debouncedSpeak:e}=this.props;e(s?Object(c.sprintf)(
/* translators: %d: number of results. */
Object(c._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):Object(c.__)("No results."),"assertive")}}renderTokensAndInput(){const e=Object(o.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const o=this.getTokenValue(e),s=e.status?e.status:void 0,i=t+1,c=n.length;return Object(r.createElement)(m,{key:"token-"+o,value:o,status:s,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==s&&this.props.disabled,messages:this.props.messages,termsCount:c,termPosition:i})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:o,value:s,instanceId:i}=this.props;let c={instanceId:i,autoCapitalize:e,autoComplete:t,placeholder:0===s.length?o:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&s.length>=n||(c={...c,onChange:this.onInputChange}),Object(r.createElement)(h.a,c)}render(){const{disabled:e,label:t=Object(c.__)("Add item"),instanceId:n,className:o,__experimentalShowHowTo:s}=this.props,{isExpanded:a}=this.state,l=i()(o,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let u={className:"components-form-token-field",tabIndex:"-1"};const d=this.getMatchingSuggestions();return e||(u=Object.assign({},u,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),Object(r.createElement)("div",u,Object(r.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),Object(r.createElement)("div",{ref:this.bindTokensAndInput,className:l,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),a&&Object(r.createElement)(g.a,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:d,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),s&&Object(r.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?Object(c.__)("Separate with commas, spaces, or the Enter key."):Object(c.__)("Separate with commas or the Enter key.")))}}w.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:o.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:Object(c.__)("Item added."),removed:Object(c.__)("Item removed."),remove:Object(c.__)("Remove item"),__experimentalInvalid:Object(c.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0},t.a=j(Object(a.withInstanceId)(w))},,,,,,,,function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(0),o=n(44),s=n(20),i=n(45),c=n(27),a=n(31),l=n(53),u=n(22);const d=({queryAttribute:e,queryPrices:t,queryStock:n,queryRating:d,queryState:p,isEditor:f=!1})=>{let b=Object(u.a)();b=`${b}-collection-data`;const[m]=Object(a.a)(b),[h,g]=Object(a.b)("calculate_attribute_counts",[],b),[O,v]=Object(a.b)("calculate_price_range",null,b),[j,y]=Object(a.b)("calculate_stock_status_counts",null,b),[w,E]=Object(a.b)("calculate_rating_counts",null,b),k=Object(c.a)(e||{}),S=Object(c.a)(t),x=Object(c.a)(n),_=Object(c.a)(d);Object(r.useEffect)((()=>{"object"==typeof k&&Object.keys(k).length&&(h.find((e=>Object(s.b)(k,"taxonomy")&&e.taxonomy===k.taxonomy))||g([...h,k]))}),[k,h,g]),Object(r.useEffect)((()=>{O!==S&&void 0!==S&&v(S)}),[S,v,O]),Object(r.useEffect)((()=>{j!==x&&void 0!==x&&y(x)}),[x,y,j]),Object(r.useEffect)((()=>{w!==_&&void 0!==_&&E(_)}),[_,E,w]);const[T,C]=Object(r.useState)(f),[L]=Object(o.a)(T,200);T||C(!0);const A=Object(r.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(i.a)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),t})(m)),[m]);return Object(l.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...p,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...A},shouldSelect:L})}},,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(20);const o=e=>Object(r.b)(e,"count")&&Object(r.b)(e,"description")&&Object(r.b)(e,"id")&&Object(r.b)(e,"name")&&Object(r.b)(e,"parent")&&Object(r.b)(e,"slug")&&"number"==typeof e.count&&"string"==typeof e.description&&"number"==typeof e.id&&"string"==typeof e.name&&"number"==typeof e.parent&&"string"==typeof e.slug,s=e=>Array.isArray(e)&&e.every(o),i=e=>Object(r.b)(e,"attribute")&&Object(r.b)(e,"operator")&&Object(r.b)(e,"slug")&&"string"==typeof e.attribute&&"string"==typeof e.operator&&Array.isArray(e.slug)&&e.slug.every((e=>"string"==typeof e)),c=e=>Array.isArray(e)&&e.every(i)},,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(10);const s=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},,,,function(e,t,n){"use strict";var r=n(0),o=n(10);const s=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=s},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(1),s=n(27),i=n(54),c=n(31),a=n(53),l=n(136),u=n(55),d=n(62),p=n(63),f=n(14),b=n.n(f),m=n(23),h=n(2),g=n(15),O=n(64),v=n(29),j=n(20),y=n(140),w=n(76),E=n(153),k=n(67),S=n(85),x=n(61),_=n(4),T=n.n(_),C=n(119),L=n(110);const A=[{value:"preview-1",formattedValue:"preview-1",name:"Blue",label:Object(r.createElement)(u.a,{name:"Blue",count:3}),textLabel:"Blue (3)"},{value:"preview-2",formattedValue:"preview-2",name:"Green",label:Object(r.createElement)(u.a,{name:"Green",count:3}),textLabel:"Green (3)"},{value:"preview-3",formattedValue:"preview-3",name:"Red",label:Object(r.createElement)(u.a,{name:"Red",count:2}),textLabel:"Red (2)"}],I={count:0,has_archives:!0,id:0,label:"Preview",name:"preview",order:"menu_order",parent:0,taxonomy:"preview",type:""};n(229);var R=n(51),P=n(86),F=({isLoading:e=!1,options:t,checked:n,onChange:o})=>e?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"is-loading"}),Object(r.createElement)("span",{className:"is-loading"})):Object(r.createElement)(P.a,{className:"wc-block-attribute-filter-list",options:t,checked:n,onChange:o,isLoading:e,isDisabled:e}),M=n(48);t.a=({attributes:e,isEditor:t=!1,getNotice:n=(()=>null)})=>{const f=Object(h.getSettingWithCoercion)("hasFilterableProducts",!1,O.a),_=Object(h.getSettingWithCoercion)("isRenderingPhpTemplate",!1,O.a),P=Object(h.getSettingWithCoercion)("pageUrl",window.location.href,v.a),[N,B]=Object(r.useState)(!1),D=e.isPreview&&!e.attributeId?I:Object(C.a)(e.attributeId),V=Object(r.useMemo)((()=>Object(R.e)(D)),[D]),[W,H]=Object(r.useState)(V),[q,U]=Object(r.useState)(Object(R.d)()),[z,K]=Object(r.useState)(e.isPreview&&!e.attributeId?A:[]),[$]=Object(c.a)(),[G,Q]=Object(c.b)("attributes",[]),{results:Y,isLoading:X}=Object(a.a)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[(null==D?void 0:D.id)||0],shouldSelect:e.attributeId>0}),{results:J,isLoading:Z}=Object(l.a)({queryAttribute:{taxonomy:(null==D?void 0:D.taxonomy)||"",queryType:e.queryType},queryState:{...$},isEditor:t}),ee=Object(r.useCallback)((e=>Object(j.b)(J,"attribute_counts")&&Array.isArray(J.attribute_counts)?J.attribute_counts.find((({term:t})=>t===e)):null),[J]);Object(r.useEffect)((()=>{if(X||Z)return;if(!Array.isArray(Y))return;const t=Y.map((t=>{const n=ee(t.id);if(!(n||W.includes(t.slug)||(o=t.slug,null!=$&&$.attributes&&$.attributes.some((({attribute:e,slug:t=[]})=>e===(null==D?void 0:D.taxonomy)&&t.includes(o))))))return null;var o;const s=n?n.count:0;return{formattedValue:Object(R.c)(t.slug),value:t.slug,name:Object(m.decodeEntities)(t.name),label:Object(r.createElement)(u.a,{name:Object(m.decodeEntities)(t.name),count:e.showCounts?s:null}),textLabel:e.showCounts?`${Object(m.decodeEntities)(t.name)} (${s})`:Object(m.decodeEntities)(t.name)}})).filter((e=>!!e));K(t),U(Object(R.d)())}),[null==D?void 0:D.taxonomy,Y,X,e.showCounts,Z,ee,W,$.attributes]);const te=Object(r.useCallback)((e=>Array.isArray(Y)?Y.reduce(((t,n)=>(e.includes(n.slug)&&t.push(n),t)),[]):[]),[Y]),ne=Object(r.useCallback)(((e,t=!1)=>{if(e=e.map((e=>({...e,slug:e.slug.map((e=>decodeURIComponent(e)))}))),t){if(null==D||!D.taxonomy)return;const t=Object.keys(Object(g.getQueryArgs)(window.location.href)),n=Object(R.h)(D.taxonomy),r=t.reduce(((e,t)=>t.includes(k.b+n)||t.includes(k.a+n)?Object(g.removeQueryArgs)(e,t):e),window.location.href),o=Object(R.b)(r,e);Object(k.c)(o)}else{const t=Object(R.b)(P,e),n=Object(g.getQueryArgs)(window.location.href),r=Object(g.getQueryArgs)(t);Object(R.f)(n,r)||Object(k.c)(t)}}),[P,null==D?void 0:D.taxonomy]),re=t=>{const n=Object(L.b)(G,Q,D,te(t),"or"===e.queryType?"in":"and");ne(n,0===t.length)},oe=Object(r.useCallback)(((n,r=!1)=>{t||(H(n),!r&&e.showFilterButton||Object(L.b)(G,Q,D,te(n),"or"===e.queryType?"in":"and"))}),[t,H,G,Q,D,te,e.queryType,e.showFilterButton]),se=Object(r.useMemo)((()=>Object(y.a)(G)?G.filter((({attribute:e})=>e===(null==D?void 0:D.taxonomy))).flatMap((({slug:e})=>e)):[]),[G,null==D?void 0:D.taxonomy]),ie=Object(s.a)(se),ce=Object(i.a)(ie);Object(r.useEffect)((()=>{!ce||b()(ce,ie)||b()(W,ie)||oe(ie)}),[W,ie,ce,oe]);const ae="single"!==e.selectType,le=Object(r.useCallback)((e=>{const t=W.includes(e);let n;ae?(n=W.filter((t=>t!==e)),t||(n.push(e),n.sort())):n=t?[]:[e],oe(n)}),[W,ae,oe]);Object(r.useEffect)((()=>{D&&!e.showFilterButton&&(Object(R.a)({currentCheckedFilters:W,hasSetFilterDefaultsFromUrl:N})?ne(G,!0):ne(G,!1))}),[N,ne,G,D,W,e.showFilterButton]),Object(r.useEffect)((()=>{if(!N&&!X)return V.length>0?(B(!0),void oe(V,!0)):void(_||B(!0))}),[D,N,X,oe,V,_]);const ue=Object(M.b)();if(!f)return ue(!1),null;if(!D)return t?n("noAttributes"):(ue(!1),null);if(0===z.length&&!X&&t)return n("noProducts");const de=`h${e.headingLevel}`,pe=!e.isPreview&&X,fe=!e.isPreview&&Z,be=(pe||fe)&&0===z.length;if(!be&&0===z.length)return ue(!1),null;const me=ae?!be&&W.length<z.length:!be&&0===W.length,he=Object(r.createElement)(de,{className:"wc-block-attribute-filter__title"},e.heading),ge=be?Object(r.createElement)(x.a,null,he):he;return ue(!0),Object(r.createElement)(r.Fragment,null,!t&&e.heading&&ge,Object(r.createElement)("div",{className:T()("wc-block-attribute-filter",`style-${e.displayStyle}`)},"dropdown"===e.displayStyle?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(S.a,{key:q,className:T()({"single-selection":!ae,"is-loading":be}),suggestions:z.filter((e=>!W.includes(e.value))).map((e=>e.formattedValue)),disabled:be,placeholder:Object(o.sprintf)(/* translators: %s attribute name. */
Object(o.__)("Select %s","woocommerce"),D.label),onChange:e=>{!ae&&e.length>1&&(e=[e[e.length-1]]);const t=[e=e.map((e=>{const t=z.find((t=>t.formattedValue===e));return t?t.value:e})),W].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));if(1===t.length)return le(t[0]);const n=[W,e].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));1===n.length&&le(n[0])},value:W,displayTransform:e=>{const t=z.find((t=>[t.value,t.formattedValue].includes(e)));return t?t.textLabel:e},saveTransform:R.c,messages:{added:Object(o.sprintf)(/* translators: %s is the attribute label. */
Object(o.__)("%s filter added.","woocommerce"),D.label),removed:Object(o.sprintf)(/* translators: %s is the attribute label. */
Object(o.__)("%s filter removed.","woocommerce"),D.label),remove:Object(o.sprintf)(/* translators: %s is the attribute label. */
Object(o.__)("Remove %s filter.","woocommerce"),D.label.toLocaleLowerCase()),__experimentalInvalid:Object(o.sprintf)(/* translators: %s is the attribute label. */
Object(o.__)("Invalid %s filter.","woocommerce"),D.label.toLocaleLowerCase())}}),me&&Object(r.createElement)(w.a,{icon:E.a,size:30})):Object(r.createElement)(F,{options:z,checked:W,onChange:le,isLoading:be,isDisabled:be})),Object(r.createElement)("div",{className:"wc-block-attribute-filter__actions"},(W.length>0||t)&&!be&&Object(r.createElement)(d.a,{onClick:()=>{H([]),U(Object(R.d)()),N&&re([])},screenReaderLabel:Object(o.__)("Reset attribute filter","woocommerce")}),e.showFilterButton&&Object(r.createElement)(p.a,{className:"wc-block-attribute-filter__button",isLoading:be,disabled:(()=>{if(pe||fe)return!0;const e=Object(R.e)(D);return e.length===W.length&&W.every((t=>e.includes(t)))})(),onClick:()=>re(W)})))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(249)},function(e,t,n){"use strict";n.r(t);var r=n(50),o=n(160),s=n(51);Object(r.a)({selector:".wp-block-woocommerce-attribute-filter",Block:o.a,getProps:e=>({isEditor:!1,attributes:Object(s.g)(e.dataset)})})}]);